При работе со временем и датами у встроенных модулей есть несколько неприятных моментов:
— Их слишком много: datetime, time, calendar, dateutil, pytz и другие; — В них слишком много типов: date, time, datetime, tzinfo, timedelta, relativedelta и т. д.
И вот на днях я наткнулся на пакет arrow, который их решает. Во-первых, там есть все необходимое. Во-вторых, все объекты имеют один и тот же тип Arrow.
Большой плюс в том, что пакет совместим с основными встроенными типами. Например, выше я преобразовал datetime в Arrow и обратно.
Еще из приятных бонусов: там есть функция humanize, которая конвертирует время в читаемый текст.
При работе со временем и датами у встроенных модулей есть несколько неприятных моментов:
— Их слишком много: datetime, time, calendar, dateutil, pytz и другие; — В них слишком много типов: date, time, datetime, tzinfo, timedelta, relativedelta и т. д.
И вот на днях я наткнулся на пакет arrow, который их решает. Во-первых, там есть все необходимое. Во-вторых, все объекты имеют один и тот же тип Arrow.
Большой плюс в том, что пакет совместим с основными встроенными типами. Например, выше я преобразовал datetime в Arrow и обратно.
Еще из приятных бонусов: там есть функция humanize, которая конвертирует время в читаемый текст.
Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.
Mr. Durov launched Telegram in late 2013 with his brother, Nikolai, just months before he was pushed out of VK, the Russian social-media platform he founded. Mr. Durov pitched his new app—funded with the proceeds from the VK sale—less as a business than as a way for people to send messages while avoiding government surveillance and censorship.